package cn.wolfcode.cms.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Setter
@Getter
@ToString
public class Employee {

    public static final int STATE_NORMAL = 0;  //在职
    public static final int STATE_QUIT = 1;  //离职
    private Long id;
    private String username;
    private String realname;
    private String password;
    private String tel;
    private String email;
    private Department dept;
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date inputtime;
    private int state = STATE_NORMAL;   //0 在职  1:离职
    private boolean admin;


    //多对多关心
    List<Role> roles = new ArrayList<>();

}